<template>
  <!-- 静探列表 -->
  <div class="app-container-add">
    <!-- 表格展示start -->
    <el-table
      ref="multipleTable"
      v-loading="tableLoading"
      stripe
      class="table-list"
      :data="tableData"
      :row-style="rowClass"
    >
      <el-table-column label="序号" type="index" width="55" align="center" />
      <el-table-column prop="depth" label="深度(米)" min-width="180" align="center" />
      <el-table-column prop="qc" label="qs(MPa)" min-width="120" align="center" />
      <el-table-column prop="fs" label="fs(KPa)" min-width="180" align="center" />
      <el-table-column prop="createTime" label="创建时间" width="180" align="center" />
    </el-table>
  </div>
</template>

<script>
export default {
  name: 'Index',
  props: {
    tableData: {
      type: Array,
      default: () => []
    }
  },
  data() {
    return {
      tableLoading: false, // 表格加载
      // 高亮样式
      selectRow: []
    }
  },
  methods: {
    // 高亮样式
    rowClass({ row, rowIndex }) {
      if (this.selectRow.includes(rowIndex)) {
        return { 'background-color': 'rgba(185,221,249,.75)' }
      }
    }
  }
}
</script>

